package br.com.winesys.geta.databinding.componentBinder;

import javax.swing.JFormattedTextField;
import br.com.winesys.geta.databinding.ComponentBinder;

public final class JFormattedTextBinder implements ComponentBinder<JFormattedTextField> {

	private static final ComponentBinder<JFormattedTextField> INSTANCE = new JFormattedTextBinder();

	public static ComponentBinder<JFormattedTextField> getInstance() {
		return INSTANCE;
	}

	private JFormattedTextBinder() {
	}

	@Override
	public Object read(JFormattedTextField component) {
		return component.getValue();
	}

	@Override
	public void write(JFormattedTextField component, Object value) {
		component.setValue(value);
	}
}
